Skip to content

HomeWork - Домашнее задание по корутинам#273

Open
BambinoGrandi wants to merge 3 commits intoOtus-Android:developmentfrom
BambinoGrandi:home_work
Open

HomeWork - Домашнее задание по корутинам#273
BambinoGrandi wants to merge 3 commits intoOtus-Android:developmentfrom
BambinoGrandi:home_work

Conversation

@BambinoGrandi
Copy link

Описание

  • Выполнено домашнее задание
  • Рефакторинг Callback на suspend-функции
  • Добавлен запрос loadImage() для получения картинки
  • В CatsPresnter добавлена функция load() для загрузки фактов с сети с помощью корутин
  • Реализована CatsViewModel

imageUrl = imageUrl,
)
}.onFailure { error ->
_catsFact.update {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

также перехват CancellationException

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

исправил

val facts = catsService.getCatFact()
_catsView?.populate(CatFact(facts))
} catch (e: Exception) {
errorHandler(e)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот тут еще остался перехват CancellationException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants